﻿@{
    ViewBag.Title = "HelloCanvas";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<style> 
    #canvas {
        margin: 10px;
        padding: 10px;
        background: #ffffff;
        border: thin inset #aaaaaa;
    }
</style>

<h2>Hello Canvas</h2>

<canvas id='canvas' width='600' height='300'>
    Canvas not supported
</canvas>

<script type="text/javascript">
    var canvas = document.getElementById('canvas'),
        context = canvas.getContext('2d');
   
    context.font = '38pt Arial';
    context.fillStyle = 'cornflowerblue';
    context.strokeStyle = 'blue';

    context.fillText("Hello Canvas", canvas.width/2 - 150,
                                     canvas.height/2 + 15);

    context.strokeText("Hello Canvas", canvas.width/2 - 150,
                                      canvas.height / 2 + 15);
</script> 



